# app/templates.py

from fastapi.responses import HTMLResponse


def form_page():
    return HTMLResponse("""
    <html>
        <body>
            <h2>Batch Email Sender</h2>
            <form action="/send-email" method="post" enctype="multipart/form-data">
                <label for="smtp_user">SMTP Username:</label><br>
                <input type="text" name="smtp_user" required><br><br>

                <label for="smtp_password">SMTP Password:</label><br>
                <input type="password" name="smtp_password" required><br><br>

                <label for="subject">Email Subject:</label><br>
                <input type="text" name="subject" required><br><br>

                <label for="body">Email Body (Use [name] to insert recipient name):</label><br>
                <textarea name="body" rows="4" cols="50" required></textarea><br><br>

                <label for="file">Upload Excel File:</label><br>
                <input type="file" name="file" accept=".xlsx" required><br><br>

                <label for="attachments">Upload ZIP File:</label><br>
                <input type="file" name="attachments" accept=".zip" required><br><br>

                <input type="submit" value="Send Emails">
            </form>
        </body>
    </html>
    """)
